<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <template id="t1">
      <div>
        <!-- 
          v-指令名称:指令参数.指令修饰符="表达式"
          
          指令修饰符作用
          ① 一般将和业务无关的逻辑封装到修饰符中
         -->
        <a href="./a.html" @click.prevent="hi">bing</a>
      </div>
    </template>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        template: "#t1",
        data: {
          age: 10,
        },
        methods: {
          hi(e) {
            // e.preventDefault();
            // -----
            alert("hello jack");
          },
         
        },
      });
    </script>
  </body>
</html>
